-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add orchard::bundle::BatchValidator
#338
Conversation
Codecov Report
@@ Coverage Diff @@
## main #338 +/- ##
==========================================
- Coverage 89.72% 88.99% -0.73%
==========================================
Files 36 37 +1
Lines 3823 3854 +31
==========================================
Hits 3430 3430
- Misses 393 424 +31
Continue to review full report at Codecov.
|
619e1f3
to
be69324
Compare
Adapted from the `BatchValidator` in `zcashd`, that only handles RedPallas signatures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK with suggested comment improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
@@ -69,6 +69,8 @@ impl BatchValidator { | |||
pub fn validate<R: RngCore + CryptoRng>(self, vk: &VerifyingKey, rng: R) -> bool { | |||
if self.signatures.is_empty() { | |||
// An empty batch is always valid, but is not free to run; skip it. | |||
// Note that a transaction has at least a binding signature, so if | |||
// there are no signatures, there are also no proofs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should have more precisely said "A transaction has at least an Orchard binding signature if it has any Orchard components, so if there are no Orchard signatures, there are also no Orchard proofs."
No description provided.